{% extends "kit" %}

{% block main %}
<div>
    <h2 class="{% if tests.getstatus %}pass{% else %}fail{% endif %}">Unit Tests for Kit {{ kit.getid }}</h2>

    <p class="tests_pass">{{ tests.getpasscount }} successful tests</p>

    <p class="tests_fail">{{ tests.getfailcount }} failed tests.</p>

    <p class="tests_exception">{{ tests.getexceptioncount }} exceptions</p>

    {% if tests.messages %}
    <h3>Messages</h3>
    <dl class="messages">{% for msg in tests.messages %}
        <dt class="{{ msg.type }}">{{ msg.method }}()</dt>
        <dd class="{{ msg.type }}">{{ msg.text }}</dd>{% endfor %}
    </dl>
    {% endif %}

    {% comment %}<pre>{{ tests|dump }}</pre>{% endcomment %}
</div>
{% endblock %}
